package com.study.jvm;

public class LoadTest {
public final int i = 1;

public static int j;

public final static int x = 9;


public static final String str1 = "ab";
final String str2 = "1";


static {
    System.out.println(11);
}
    public static void main(String[] args) {



//        String a = new String("a");
//
//        String b = new String("b");

        String ab = new String("a") + new String("b");// 堆中对象



        String ac = ab.intern(); // 堆中对象
        //String ad ="ab";

        String ad = ac.intern();
        System.out.println( ab == ac);

        System.out.println(ac == ad);

        //System.out.println(ad == ac);

       // Object o = new Object();


        char c = 99;
        System.out.println(c);
        System.out.println(c*2);

        int i = 10;
        System.out.println(i);

        byte j = 0;
        j = 100;
        try {

            Thread.sleep(20000);
        } catch (Exception e) {
            e.printStackTrace();
        }

        j += 30;


    }

    public int test() {

       String a = new String("a");

       String b = new String("b");

       String ab = new String("a") + new String("b");

       String ac = ab.intern();
        System.out.println( ab == ac);
       return 0;



    }
}
